package com.hoperun.service;

import java.util.List;

import com.hoperun.bean.AdminManager;
import com.hoperun.framework.ibatis.page.BootGrid;
import com.hoperun.framework.ibatis.page.BootGridPage;
import com.hoperun.framework.query.Criteria;

public interface IAdminManagerSV {
	/**
	 * 根据主键查询
	 * 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public AdminManager queryById(Long id) throws Exception;

	/**
	 * 添加
	 * 
	 * @param adminManager
	 * @return
	 * @throws Exception
	 */
	public AdminManager save(AdminManager adminManager) throws Exception;

	/**
	 * 添加
	 * 
	 * @param adminManager
	 * @return
	 * @throws Exception
	 */
	public AdminManager register(AdminManager adminManager) throws Exception;

	/**
	 * 更新
	 * 
	 * @param adminManager
	 * @throws Exception
	 */
	public void update(AdminManager adminManager) throws Exception;

	/**
	 * 物理删除
	 * 
	 * @param id
	 * @throws Exception
	 */
	public void delete(Long id) throws Exception;

	/**
	 * 新增或删除
	 * 
	 * @param adminManager
	 * @throws Exception
	 */
	public void saveOrUpdate(AdminManager adminManager) throws Exception;

	/**
	 * 新增或删除
	 * 
	 * @param list
	 * @throws Exception
	 */
	public void saveOrUpdate(List<AdminManager> list) throws Exception;

	/**
	 * 按条件查询记录
	 * 
	 * @param criteria
	 * @throws Exception
	 */
	public List<AdminManager> queryByCondition(Criteria criteria)
			throws Exception;

	/**
	 * 按条件查询记录条数
	 * 
	 * @param criteria
	 * @throws Exception
	 */
	public int queryCountByCondition(Criteria criteria) throws Exception;

	/**
	 * 分页查询
	 * 
	 * @param criteria
	 * @return
	 * @throws Exception
	 */
	public BootGridPage<AdminManager> queryPage(Criteria criteria,
			BootGrid<AdminManager> grid) throws Exception;
}
